var express = require('express');
var router = express.Router();

/* GET home page. */
// router.get('/', function(req, res, next) {
//   // res.render('index', { title: 'Express' });
// });
var message = require("./message.json");
router.get('/', function(req, res, next) {
  // res.send('respond with a resource');
  res.locals.user = req.session.user || "";
  res.locals.message = message;
  res.locals.firstnum =req.session.firstnum = Math.round(Math.random()*10);
  res.locals.secondnum = req.session.secondnum = Math.round(Math.random()*10);
  res.render("index");
});

module.exports = router;
